package hyperNexusModel

import "time"

type Server struct {
	BaseModel
	Name           string    `gorm:"column:name;type:varchar(255);default:'';comment:'服务器名称'" json:"name"`
	Zone           int32     `gorm:"column:zone;type:int;default:0;comment:'服务器ID';uniqueIndex" json:"zone"`
	ThirdZone      int32     `gorm:"column:third_zone;type:int;default:0;comment:'第三方服务器ID'" json:"thirdZone"`
	Address        string    `gorm:"column:address;type:varchar(255);default:'';comment:'服务器地址'" json:"address"`
	Port           int32     `gorm:"column:port;type:int;default:0;comment:'服务器端口'" json:"port"`
	WebAddress     string    `gorm:"column:web_address;type:varchar(255);default:'';comment:'服务器web地址'" json:"webAddress"`
	WebPort        int32     `gorm:"column:web_port;type:int;default:0;comment:'服务器web端口'" json:"webPort"`
	WebSsl         bool      `gorm:"column:web_ssl;type:tinyint(1);default:0;comment:'服务器web是否ssl'" json:"webssl"`
	WebSecret      string    `gorm:"column:web_secret;type:varchar(255);default:'';comment:'服务器web密钥'" json:"webSecret"`
	WebAddressBack string    `gorm:"column:web_address_back;type:varchar(255);default:'';comment:'备用服务器web地址'" json:"webAddressBack"`
	Status         int32     `gorm:"column:status;type:int;default:0;comment:'服务器状态'" json:"status"`
	Sort           int32     `gorm:"column:sort;type:int;default:0;comment:'服务器排序'" json:"sort"`
	Description    string    `gorm:"column:description;type:varchar(255);default:'';comment:'服务器描述'" json:"description"`
	OpenTime       time.Time `gorm:"column:open_time;type:datetime;comment:'服务器开放时间';precision:0" json:"openTime"`
}
